Skip to content

Fix package installs from command line repo#562

Merged
oliverkurth merged 1 commit intovmware:devfrom
sshedi:installrepo
Mar 23, 2026
Merged

Fix package installs from command line repo#562
oliverkurth merged 1 commit intovmware:devfrom
sshedi:installrepo

Conversation

@sshedi
Copy link
Contributor

@sshedi sshedi commented Mar 14, 2026

When installing packages from the command line, repo_internalize() must
be called first, before pool_addfileprovides() and pool_createwhatprovides()

Fixes: e890607

@sshedi sshedi force-pushed the installrepo branch 4 times, most recently from 9afa08c to 6a463cb Compare March 14, 2026 17:16
@oliverkurth
Copy link
Contributor

The fix and the test do not seem related - please separate into two commits, and update the title and description, or create a separate PR.

@sshedi
Copy link
Contributor Author

sshedi commented Mar 23, 2026

Changed the test to try the same using local repo.
I have kept server related configurations and some additional code, let's keep it in case if we need it someday for testing something quickly. What do you think? @oliverkurth

@sshedi sshedi force-pushed the installrepo branch 6 times, most recently from 71b52da to f56ff9c Compare March 23, 2026 11:59
@oliverkurth
Copy link
Contributor

Thank for the changes.

I still have a few issues:

  • we do not need to use tdnf to prepare the directory - we can just copy. This is more efficient.
  • please create separate spec files instead of re-using tdnf-test-one and tdnf-test-two to isolate this
  • remove the server_reachable() method - it's just dead code. If we ever need it tit's easy to add again, no rocket science. Also remove packages_server from the config.
  • I am still not happy with the description - the root cause is that when installing packages from the command line, repo_internalize() must be called first, before pool_addfileprovides() and pool_createwhatprovides(). It has nothing to do with disablerepo or installroot, although those options are needed to isolate the test case.

@sshedi sshedi changed the title Fix install from local RPMs with --installroot and --disablerepo=* Fix package installs from command line repo Mar 23, 2026
@sshedi
Copy link
Contributor Author

sshedi commented Mar 23, 2026

we do not need to use tdnf to prepare the directory - we can just copy. This is more efficient.

It is deliberate decision, downloadonly and repofrompath gets tested along with this. Using cp is easy but better to have tests like these which are real life use cases.

please create separate spec files instead of re-using tdnf-test-one and tdnf-test-two to isolate this

Done, thought of reducing test time by not building additional packages.

remove the server_reachable() method - it's just dead code. If we ever need it tit's easy to add again, no rocket science. Also remove packages_server from the config.

Done. The concern was about the time we waste while adding this again to figure things out, if we quickly want to test something while developing something before adding a proper test case.

I am still not happy with the description - the root cause is that when installing packages from the command line, repo_internalize() must be called first, before pool_addfileprovides() and pool_createwhatprovides(). It has nothing to do with disablerepo or installroot, although those options are needed to isolate the test case.

Done.

When installing packages from the command line, repo_internalize() must
be called first, before pool_addfileprovides() and pool_createwhatprovides()

Fixes: e890607

Signed-off-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
@oliverkurth oliverkurth merged commit eeb6088 into vmware:dev Mar 23, 2026
8 checks passed
@sshedi sshedi deleted the installrepo branch March 23, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants